/* nodejs的事件轮询机制 */

setTimeout(function () {
    console.log('setTimeout()');
}, 0)

setImmediate(() => {
    console.log('setImmeddiate()');
})

process.nextTick(() => {
    console.log('process.nextTick()');

})

/*
process.nextTick() 在任意阶段优先执行
setTimeout()
setImmeddiate()   */